package secretary;

import java.sql.SQLException;

import basic.ClientConsole;

import com.sun.rowset.CachedRowSetImpl;

import flexibility.userData;

public class checkForCurrentSemester {
	private boolean isCurrent = false;

	public boolean checkForCurrentSemester(ClientConsole secretaryConnection,CachedRowSetImpl crs, userData secretaryData){
		//this will check if there is a current semester active
		secretaryData.deleteAll();
		secretaryData.addData(17);
		secretaryData.addData(1);
		secretaryConnection.acceptMsg(secretaryData);
		crs = secretaryConnection.getResults();
		try {
			if(crs.next()==true){
				isCurrent = true;
			}
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return isCurrent;
	}
}
